<!--[*
// ----------------------------------------------------------------------
// Source file:  $Source: /cvsroot/pn-commerce/pn-commerce/pntemplates/pncommerce_admin_itemedit.html,v $
//
// Last changes from:  $Author: haehnchen $
//
// Revision:           $Revision: 1.27 $
//
// Date of revision    $Date: 2005/08/08 19:39:18 $
//
// ----------------------------------------------------------------------
*]-->

<!--[ include file='pncommerce_admin_commonHeader.html' ]-->

<!--[ pncGetConfigArticles ]--> 
<!--[ pncGetSchemes assign="schemes" ]--> 
<!--[ pncGetConfigThumbnail ]--> 
<!--[ pncGetConfigSupplier ]-->
 
<b><!--[ pnml name='_PNC_TYPENEWITEM' ]--></b><br>

<fieldset>
    <legend>
        <!--[pnml name='_PNC_TYPENEWITEM' html=1 ]-->&nbsp; <a <!--[pncManualURL Chapter="702" OpenHelpWindow='1']-->> <!--[pnimg src="doc.gif" border='0' ]--></a>
    </legend>

<form enctype='multipart/form-data' action='<!--[ pncAdminModURL func=itemeditresponse ]-->' method='post'>
<!--IMPORTANT!-->
<input type="hidden" name="authid" value="<!--[pnsecgenauthkey module="pncommerce"]-->">

<table width='100%' border='0'>
    <tr>
        <td style='border: 1px solid black' align='center'>
            <table>
                <tr>
                    <td colspan='2' align='center'>
                        <b><!--[ pnml name='_PNC_MAINITEMPROPERTIES' ]--></b>
                    </td>
                </tr>
                <!-- Product Properties - left side tables -->
                <tr>
                    <td align='left' width='400'>
                        <!--[ pnml name='_PNC_PRODUCTNUMBER' ]-->
                    </td>
                    <td>
                        <input class='pn-text' type='text' name='ItemSKU' size='50' value='<!--[ $Item.SKU ]-->'>
                    </td>
                </tr>
                <tr>
                    <td align='left' width='400'>
                        <!--[ pnml name='_PNC_PRODUCTNAME' ]-->
                    </td>
                    <td>
                        <input class='pn-text' type='text' name='ItemName' size='50' value="<!--[ $Item.Name ]-->">
                    </td>
                </tr>
                <tr>
                    <td align='left' width='400'>
                        <!--[ pnml name='_PNC_SCHEME' ]-->
                    </td>
                    <td>
                        <input type="hidden" name="oldScheme_ID" value="<!--[$Item.Scheme_ID]-->">
                        <select  class='pn-text' name='Scheme_ID'>
                            <option value="0" <!--[if $Item.Scheme_ID == 0]--> selected  <!--[/if]--> >
                                <!--[ pnml name='_PNC_NOSCHEME' ]-->   
                            </option>    
                            <!--[ foreach item=scheme from=$schemes ]-->
                                <option value="<!--[ $scheme.scheme_id ]-->" <!--[if $Item.Scheme_ID == $scheme.scheme_id]-->selected<!--[/if]-->>
                                  <!--[ $scheme.name]--> - <!--[ $scheme.description]-->
                                </option>    
                            <!--[ /foreach ]-->
                        </select>
                    </td>
                </tr>
                <tr>
                    <td align='left' width='400'>
                            <!--[ pnml name='_PNC_PRICE' ]-->
                    </td>
                    <td align='left'>
                        <!--[ if $shopConfigSupplier.VatIncluded == 'on' ]-->
                            <input class='pn-text' type='text' name='ItemCost' size='50' value='<!--[ $Item.CostLong|pncShowAsPrice:true:false:false ]-->'>
                        <!--[ else ]-->
                            <input class='pn-text' type='text' name='ItemCost' size='50' value='<!--[ $Item.Cost|pncShowAsPrice:true:false:false ]-->'>
                        <!--[ /if ]-->
                    </td>
                </tr>
                <tr>
                    <td align='left' width='400'>
                            <!--[ pnml name='_PNC_WEIGHT' ]-->
                    </td>
                    <td align='left'>
                        <input class='pn-text' type='text' name='Weight' SIZE='10' value='<!--[ $Item.Weight|pncShowAsPrice:false:false:false:3 ]-->'>
                        <!--[ pnml name=`$shopConfigArticles.WeightUnit` ]-->

                    </td>
                </tr>
                <tr>
                    <td align='left' width='400'>
                            <!--[ pnml name='_PNC_TAXEXEMPT' ]-->
                    </td>
                    <td>
                            <input class='pn-text' type='checkbox' name='TaxExempt' value='on' <!--[ $Item.TaxExemptHTML ]--> >
                    </td>
                </tr>
                <tr>
                    <td align='left' width='400'>
                        <!--[ pnml name='_PNC_VATID' ]-->
                    </td>
                    <td>
                        <select  class='pn-text' name='VATID'>
                        <!--[ $VATList ]-->
                        </select>
                    </td>
                </tr>
                <tr>
                    <td>&nbsp;
                        
                    </td>
                    <td>        
                        <!--[ pnml name='_PNC_CURRENTVATID' ]-->: <!--[ $Item.Vat ]-->%
                    </td>
                </tr>
		<tr>
                    <td align='left' width='400'>
                        <!--[ pnml name='_PNC_SUPPLIER' ]-->
                    </td>
                    <td>
                        <select  class='pn-text' name='Supplier_ID'>
                            <option value="0" <!--[if $Item.Supplier_ID == 0]--> selected  <!--[/if]--> >
                                <!--[ pnml name='_PNC_NOSUPPLIER' ]-->
                            </option>
                            <!--[ foreach item=supplier from=$suppliers ]-->
                                <option value="<!--[ $supplier.supplier_id ]-->" <!--[if $Item.Supplier_ID == $supplier.supplier_id]-->selected<!--[/if]-->>
                                  <!--[ $supplier.name]-->
                                </option>
                            <!--[ /foreach ]-->
                        </select>
                    </td>
                </tr>
                <tr>
                    <td align='left' WIDTH='400'>
                        <!--[ pnml name='_PNC_SELECTACATEGORY' ]-->
                    </td>
                    <td>
                        <select class='pn-text' name='CategoryID' size='1'>
                        <!--[ $AvailableCategoryTree ]-->
                        </select>
                    </td>
                </tr>
                <tr>
                    <td align='left' valign='top' WIDTH='400'>
                        <!--[ pnml name='_PNC_DESCRIPTION' ]-->
                    </td>
                    <td>
                        <textarea name='ItemDescription' rows='10' cols='40' wrap><!--[ $Item.Desc ]-->
			<!--[ if $Item.ItemFakeProperties != "" ]-->
				 <div><!--[ $Item.ItemFakeProperties ]--></div>
			<!--[ /if ]-->

                        </textarea>
                    </td>
                </tr>
            </table>
        </td>
</fieldset>

        <!-- Product Image Properties - right side tables -->

        <td style='border: 1px solid black' valign='top'>
            <table>
                <tr>
                    <td colspan='2' align='center'>
                        <b><!--[ pnml name='_PNC_ITEMIMAGEPROPERTIES' ]--></b>
                    </td>
                </tr>

                <!--[ if $ImageDirIsWritable==false ]-->
                <tr>
                    <td colspan='2'>
                        <table bgcolor='red' cellpadding='7'>
                            <tr>
                                <td align='center'>
                                    <b><!--[ pnml name='_PNC_CHMODWARNING' ]--></b>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <!--[ else ]-->
                <tr>
                    <td>&nbsp;
                        
                    </td>
                </tr>
                <!--[ /if ]-->
                <tr>
                    <td colspan='2' align='left'>&nbsp;<br>
                        <!--[ pnml name='_PNC_SENDTHISFILE' ]-->:<br>
                        <input class='pn-text' type='file' name='image'><br><br>
                        <!--[ pnml name='_PNC_SELECTTNMETHOD' ]-->:<br>
                        <table cellspacing='5'>
                            <tr>
                                <!--[ if $shopConfigThumbnail.TNIgnoreDisable<>on ]-->
                                <td valign='top'>
                                    <input class='pn-text' type='radio' name='tngen' value='ignore' checked='checked'>
                                </td>
                                <td>
                                    <!--[ pnml name='_PNC_IGNORETNIMAGE' ]-->
                                </td>
                                <!--[ else ]-->
                                <td colspan='2'>
                                    <!--[ pnml name='_PNC_THUMBNAILUSAGEDISABLED' ]-->
                                </td>
                                <!--[ /if ]-->
                            </tr>

                            <tr>
                                <!--[ if $shopConfigThumbnail.TNUploadDisable<>on ]-->
                                <td valign='top'>
                                    <input class='pn-text' type='radio' name='tngen' value='upload'>
                                </td>
                                <td>
                                    <!--[ pnml name='_PNC_UPLOADTNIMAGE' ]--><br>

                                    <input class='pn-text' type='file' name='imagetn'>
                                </td>
                                <!--[ else ]-->
                                <td colspan='2'>
                                    <!--[ pnml name='_PNC_THUMBNAILUPLOADDISABLED' ]-->
                                </td>
                                <!--[ /if ]-->
                            </tr>
                            <tr>
                                <!--[ if $shopConfigThumbnail.TNCreateDisable<>on ]-->
                                <td valign='top'>
                                    <input class='pn-text' type='radio' name='tngen' value='create'>
                                </td>
                                <td>
                                    <!--[ pnml name='_PNC_CREATETNIMAGE' ]--><br>
                                    <!--[ pnml name='_PNC_WIDTH' ]-->:
                                    <input class='pn-text' type='text' name='tnwidth' size='3' value='<!--[ $shopConfigThumbnail.TNWidth ]-->' ><br>
                                    <!--[ pnml name='_PNC_HEIGHT' ]-->:
                                    <input class='pn-text' type='text' name='tnheight' size='3' value='<!--[ $shopConfigThumbnail.TNHeight ]-->' >
                                </td>
                                <!--[ else ]-->
                                <td colspan='2'>
                                    <!--[ pnml name='_PNC_THUMBNAILUPLOADDISABLED' ]-->
                                </td>
                                <!--[ /if ]-->
                            </tr>
                            
                            <tr>
                                <td colspan='2'>
                                    <!--[ if $Item.Image <> false ]-->
                                    <!--[ pnml name='_PNC_DELETEIMAGE' ]-->:
                                    <input class='pn-text' type='checkbox' name='delimage' value='true'>
                                    <!--[ /if ]-->
                                </td>
                            </tr>
                            <tr>
                                <td colspan='2'>
                                    <!--[ if $Item.ImageTN <> false ]-->
                                    <!--[ pnml name='_PNC_DELETEIMAGETN' ]-->:
                                    <input class='pn-text' type='checkbox' name='delimagetn' value='true'><br>
                                    <!--[ /if ]-->
                                </td>
                            </tr>
                            <tr>
                                <td colspan='2' align='center'>
                                    <!--[ if $Item.ImageTN <> false ]-->
                                    <a href="<!--[ $Item.Image ]-->" target='_blank'><img border='0' alt='<!--[ pnml name='_PNC_SHOWIMAGE' ]-->' src='<!--[ $Item.ImageTN ]-->'></a>
                                    <!--[ /if ]-->
                                </td>
                            </tr>

                        </table>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
        <td colspan="2" style='border: 1px solid black' align='center'>

            <table>
                <tr>
                     <td align='center'>
                         <b><!--[ pnml name='_PNC_ITEMQUANTITYPROPERTIES' ]--></b>
                     </td>
                </tr>
                <tr>
                    <td>
                        <!--[ pnml name='_PNC_QUANTITYONHAND' ]-->:
                        <input class='pn-text' type='text' name='QuantityOnHand' size='20' value='<!--[ $Item.Quantity ]-->'>
                        <!--[ pnml name='_PNC_OR' ]-->:
                    </td>
                </tr>
                <tr>
                    <td>
                        <!--[ pnml name='_PNC_IGNOREQUANTITY' ]-->
                    </td>
                    <td>
                        <input class='pn-text' type='checkbox' name='IgnoreQuantity' value='on' <!--[ $Item.IgnoreQuantityHTML ]--> >
                    </td>
                </tr>
            </table>

        </td>
    </tr>
    <tr>
        <td colspan="2" style='border: 1px solid black' align='left'>
            <!--[ pnml name='_PNC_DYNAMICPROPERTIES' ]--><br />
            <!--[ foreach item=property from=$Item.PropertiesData ]-->
                <!--[ pnmodapifunc modname=pncommerce type=$property.type func=getVisualOutput purpose=objectedit property=$property ]--><br />
            <!--[ foreachelse ]-->
                <!--[ pnml name='_PNC_NOPROPERTIESDEFINED' ]-->
            <!--[ /foreach ]-->
        </td>
    </tr>
</table>

<br>
<div align='center'>
    <input type='hidden' name='ItemID' value='<!--[ $Item.ID ]-->'>
    <input class='pn-button' type='submit' name='Submit' value='<!--[ pnml name='_PNC_SUBMIT' ]-->'>
    &nbsp;+&nbsp;
    <select name='redirect'>
    <option value='backtomain'><!--[ pnml name='_PNC_BACKTOSHOPADMIN' ]--></option>
    <option value='backtoitem'><!--[ pnml name='_PNC_BACKTOTHISITEM' ]--></option>
    <option value='backtotree'><!--[ pnml name='_PNC_BACKTOSTRUCTURETREE' ]--></option>
    <option value='backtosearch'><!--[ pnml name='_PNC_BACKTOITEMSEARCH' ]--></option>
    <option value='backtoitemview'><!--[ pnml name='_PNC_BACKTOITEMVIEW' ]--></option>
    </select>    
</div>
<br>
</form>

<div align='center'>
<form action='<!--[ pncAdminModURL func=itemsearch ]-->' method='post'>
    <input class='pn-button' type='submit' value='<!--[ pnml name='_PNC_BACKTOITEMSEARCH' ]-->'>
</form>
</div>
<hr width='100%' noshade>

<form action='<!--[ pncAdminModURL func=itemrem ]-->' method='post'>
<input type='hidden' name='Mode' value='delete'>
<input type='hidden' name='ItemID' value=<!--[ $Item.ID ]--> >
<table width='100%'>
    <!--[ if $Item.OrderedQuantity == 0 ]-->
    <tr>
        <td width='50%' align='right'>
            <!--[ pnml name='_PNC_REMOVEITEM' ]--><input type='checkbox' name='delete' value='delete'>
        </td>
        <td>
            <input class='pn-button' type='submit' name='Submit' value='<!--[ pnml name='_PNC_CONFIRMDELETE' ]-->' >
        </td>
    </tr>
    <!--[ else ]-->
    <tr>
        <td>&nbsp;
            
        </td>
        <td>
            <!--[ pnml name='_PNC_ITEMREMWARNING' ]--> <!--[ $Item.OrderedQuantity]-->
        </td>
    </tr>
    <!--[ /if ]-->
</table>
</form>

<!--[*pndebug*]-->
<!--[ include file='pncommerce_admin_commonFooter.html' ]-->
